import sqlalchemy
def get_length_from_column(column):
    return hasattr(column.type, 'length') and column.type.length or None

def is_date(column):
    return type(column.type) in [sqlalchemy.Date, sqlalchemy.DateTime]  

def is_number(column):
    return type(column.type) in [sqlalchemy.Float, sqlalchemy.Numeric]  

def convert_decimal_abs(value):
    return abs(eval(value.replace(',', '.')))

